home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Graphics / CFG 2.1 UR / CFG & Frontier / CFG.DocServer next >
Encoding:
Text File  |  1994-04-16  |  48.9 KB  |  1,149 lines  |  [TEXT/DOCS]

  1.  
  2. Verb    CFG.alertDialog
  3. Syntax    CFG.alertDialog( message )
  4. Parameters    message is the message to display to the user.
  5. Action    Displays an alert box with the specified message.
  6. Returns    True
  7. Examples    CFG.alertDialog( "Warning!  Low memory situation." )
  8.     » true
  9. Notes    This verb displays an alert box with the "Caution" icon.  The message appears next to the icon and a single "OK" button appears below the message.  The alert waits until the user strikes the OK button.
  10. If CFG dialog display is disabled, this function will not display anything.  It simply returns True.
  11. One should only call this function if CFG is the front application (i.e. useful for shared menus).
  12. See Also    CFG.askDialog
  13. CFG.confirmDialog
  14. CFG.enableDialogs
  15.  
  16. Verb    CFG.askDialog
  17. Syntax    CFG.askDialog( prompt, answer )
  18. Parameters    prompt is the message to display in the dialog.
  19. answer is the default answer
  20. Action    Displays an dialog box with a prompt and waits for the user to enter the answer string.
  21. Returns    True if OK hit or false for Cancel.  If OK was hit, answer will contain the response.
  22. Examples    local( answer = "Alicia" )
  23. CFG.askDialog( "Who is your favorite person?", @answer )
  24.     » true
  25. answer stores the user's response ("Alicia" if the default answer was kept)
  26.  
  27. local( answer = "Rover" )
  28. CFG.askDialog( "What is the name of your dog?", @answer )
  29.     » false
  30. The user selected Cancel.  The value in answer is ignored as Cancel was selected.
  31. Notes    A dialog is displayed with a prompt, an editable text with an initial value of answer, and two buttons:  OK and Cancel.
  32. If CFG dialog display is disabled, this function will not display anything.  It simply returns True.
  33. One should only call this function if CFG is the front application (i.e. useful for shared menus).
  34. See Also    CFG.alertDialog
  35. CFG.confirmDialog
  36. CFG.enableDialogs
  37.  
  38. Verb    CFG.cancelBuild
  39. Syntax    CFG.cancelBuild()
  40. Parameters    None
  41. Action    Stops the fractal generation process for the target.
  42. Returns    True on success, false on error.
  43. Examples    CFG.cancelBuild()
  44.     » true
  45. Notes    The target window must be a fractal window.
  46. This routine returns true for fractal windows whether or not they are being generated.
  47. See Also    CFG.continueBuild
  48. CFG.generating
  49. CFG.redraw
  50.  
  51. Verb    CFG.cfgVersion
  52. Syntax    CFG.cfgVersion()
  53. Parameters    None
  54. Action    Determines the version number of Color Fractal Generator.
  55. Returns    String4 with version and registration information.
  56. Examples    CFG.cfgVersion()
  57.     » 'R210'
  58. The R indicates that CFG is registered.  210 means version 2.10.
  59.  
  60. CFG.cfgVersion()
  61.     » 'U210'
  62. The U indicates that CFG is not registered.  Certain features will be disabled.
  63. Notes    The first character returned indicates whether the program is registered ('R') or not registered ('U').
  64. The last three characters indicate the major version number, revision number, and maintenance release number, respectively.
  65. See Also    none
  66.  
  67. Verb    CFG.clear
  68. Syntax    CFG.clear()
  69. Parameters    none
  70. Action    Clears a fractal window's selection.
  71. Returns    True if anything was cleared, false otherwise.
  72. Examples    CFG.clear
  73.     » true
  74. Notes    The target window must be a fractal window.  At least some portion of the image must be selected.
  75. This command cannot be used when the target window is building a fractal.
  76. See Also    CFG.copy
  77. CFG.cut
  78. CFG.paste
  79.  
  80. Verb    CFG.clearErrorString
  81. Syntax    CFG.clearErrorString()
  82. Parameters    None
  83. Action    Sets the error string to a NULL string ("").
  84. Returns    True
  85. Examples    CFG.clearErrorString()
  86.     » True
  87. Notes    Use this function to clear old errors so that one may see if a set of instructions generates any new errors.
  88. See Also    CFG.errorString()
  89.  
  90. Verb    CFG.closeWindow
  91. Syntax    CFG.closeWindow( [action] )
  92. Parameters    action is an optional parameter.  If present, it should have a value of 1, 2, or 3.
  93. Action    Closes the target window.
  94. Returns    True if closed, false if still open.
  95. Examples    CFG.closeWindow( CFG.const.saveDataNo )
  96.     » true
  97. Notes    The New Parameters Window may not be closed.  Attempting to close it always returns false.
  98. After the window is closed, the target is cleared.  If no new target is assigned, the default target window becomes the front-most window.
  99. The optional parameter action specifies whether to automatically save the window if dirty, don't save, or prompt the user.  See "CFG.const.saveData..." constants.
  100. If CFG dialog display is disabled, this function will not display any prompts.  Windows will simply not be saved.
  101. See Also    CFG.enableDialogs
  102. CFG.newWindow
  103. CFG.openHelpWindow
  104. CFG.openWindow
  105.  
  106. Verb    CFG.confirmDialog
  107. Syntax    CFG.confirmDialog( question )
  108. Parameters    question is the question which the user either confirms or denies.
  109. Action    Displays a dialog querying the user to continue or cancel the action.
  110. Returns    True if OK hit, false for Cancel.
  111. Examples    CFG.confirmDialog( "Do you really want to erase your hard drive?" )
  112.     » false
  113. The user hit cancel, indicating a desired to keep the hard drive intact.
  114. Notes    This verb displays a dialog with the specified question.  The user may hit OK to continue the action or Cancel to abort.
  115. If CFG dialog display is disabled, this function will not display anything.  It simply returns True.
  116. One should only call this function if CFG is the front application (i.e. useful for shared menus).
  117. See Also    CFG.alertDialog
  118. CFG.askDialog
  119. CFG.enableDialogs
  120.  
  121. Verb    CFG.continueBuild
  122. Syntax    CFG.continueBuild()
  123. Parameters    None
  124. Action    Start building the target fractal from where we left off.
  125. Returns    True on successful start of continue, false on redraw needed.
  126. Examples    CFG.continueBuild()
  127.     » true
  128. Fractal creation is continuing from where we last left off.
  129.  
  130. CFG.continueBuild()
  131.     » false
  132. Either target was not a fractal or continuation not possible due to fractal window state change (such as different fractal parameters).
  133. Notes    The target window must be a fractal window.
  134. A continue may not be possible if fractal parameters were changed since the last generation process was stopped.  In that case, false is returned as the result and the fractal will not be generated.
  135. This command cannot be used when the target window is building a fractal.
  136. See Also    CFG.cancelBuild
  137. CFG.isBuilding
  138. CFG.redraw
  139.  
  140. Verb    CFG.copy
  141. Syntax    CFG.copy()
  142. Parameters    none
  143. Action    Copies current selection to the Clipboard.  This can either be an image from a fractal or text from the Help window.
  144. Returns    True if data copied to the Clipboard, false otherwise.
  145. Examples    CFG.copy
  146.     » True
  147. Notes    Fractal images cannot be copied for non-registered versions of Color Fractal Generator.
  148. This command cannot be used when the target window is building a fractal.
  149. Data is only placed in the Clipboard if CFG is the active application.
  150. See Also    CFG.clear
  151. CFG.cut
  152. CFG.paste
  153.  
  154. Verb    CFG.countFracWindows
  155. Syntax    CFG.countFracWindows()
  156. Parameters    None
  157. Action    Counts the number of fractal windows.
  158. Returns    An integer with the number of fractal windows.
  159. Examples    CFG.countFracWindows()
  160.     » 1
  161. There is one open window which is a fractal.
  162. Notes    The count will not include the New Parameters window or the Help window.
  163. See Also    CFG.countWindows
  164.  
  165. Verb    CFG.countWindows
  166. Syntax    CFG.countWindows()
  167. Parameters    None
  168. Action    Count the number of application windows that are currently open.
  169. Returns    An integer with the number of open windows.
  170. Examples    CFG.countWindows()
  171.     » 3
  172. Three windows are open:  the New Parameters Window and two others.
  173. Notes    The count includes the New Parameters Window and the Help Window (if open).
  174. See Also    CFG.countFracWindows
  175.  
  176. Verb    CFG.cut
  177. Syntax    CFG.cut()
  178. Parameters    none
  179. Action    Copies current selection to the Clipboard and then clears the selection.
  180. Returns    True if the image was cut or false if the operation failed.
  181. Examples    CFG.cut()
  182.     » True
  183. Notes    The target window must be a fractal window.
  184. For non-registered versions of CFG, CFG.cut() operates as CFG.clear().
  185. This command cannot be used when the target window is building a fractal.
  186. Data is only placed in the Clipboard if CFG is the active application.
  187. See Also    CFG.clear
  188. CFG.copy
  189. CFG.paste
  190.  
  191. Verb    CFG.cycleWindows
  192. Syntax    CFG.cycleWindows()
  193. Parameters    None
  194. Action    This function moves the top window behind all other windows.  The second window is now the top and it is made the target window.
  195. Returns    String with the name of the new top window.
  196. Examples    CFG.cycleWindows()
  197.     » "Mandlebrot 1"
  198. Notes    The new top window is now the target window.
  199. See Also    CFG.nthWindow
  200. CFG.selectWindow
  201. CFG.setTarget
  202.  
  203. Verb    CFG.deselect
  204. Syntax    CFG.deselect()
  205. Parameters    None
  206. Action    Remove any selection in the target.
  207. Returns    True if deselected, false on error.
  208. Examples    CFG.deselect()
  209.     » true
  210. Notes    This verb should not be applied to the New Parameters Window as it cannot have any selections.
  211. If applied to the correct window type, true is returned even if no selection exists.
  212. This command cannot be used when the target window is building a fractal.
  213. See Also    CFG.getSelection
  214. CFG.haveSelection
  215. CFG.selectAll
  216. CFG.selectRectAbs
  217. CFG.selectRectRel
  218.  
  219. Verb    CFG.displayFracDialog
  220. Syntax    CFG.displayFracDialog( [fractal] )
  221. Parameters    fractal is an optional parameter.  For non-fractal target windows, this string specifies the name or ID of the fractal data to edit.
  222. Action    Displays the dialog box for the target's fractal.
  223. Returns    True if OK chosen, false otherwise.
  224. Examples    CFG.displayFracDialog()
  225.     » true
  226.  
  227. CFG.displayFracDialog( CFG.const.ftypeDragon )
  228.     » true
  229.  
  230. CFG.displayFracDialog( CFG.const.fnameMandelbrot )
  231.     » true
  232. Notes    If the target is a fractal, the parameter "fractal" is ignored.  The data used in the dialog box is from the target's fractal type and data.
  233. For non-fractal targets, if "fractal" is specified, the global data for that fractal type is edited.  Otherwise, the data for the fractal type specified in the New Parameters Window is displayed.
  234. If CFG dialog display is disabled, this function will not display anything.  It simply returns True.
  235. This command cannot be used when the target window is building a fractal.
  236. See Also    CFG.enableDialogs
  237.  
  238. Verb    CFG.displayPrefsDialog
  239. Syntax    CFG.displayPrefsDialog()
  240. Parameters    None
  241. Action    Displays the preferences dialog box with the target's preferences.
  242. Returns    True if user selected OK, false for Cancel.
  243. Examples    CFG.displayPrefsDialog()
  244.     » true
  245. Notes    If the target is not a fractal window, the global preferences will be displayed in the dialog box.  These are used for creating new fractals.
  246. If CFG dialog display is disabled, this function will not display anything.  It simply returns True.
  247. This command cannot be used when the target window is building a fractal.
  248. See Also    CFG.enableDialogs
  249. CFG.getPrefs
  250. CFG.setPrefs
  251.  
  252. Verb    CFG.enableDialogs
  253. Syntax    CFG.enableDialogs( enable )
  254. Parameters    enable is a Boolean indicating whether or not to enable alerts.
  255. Action    Enables or disables alerts and dialog boxes.  This is useful if user interaction is not desired.
  256. Returns    Boolean indicating the previous state of CFG.enableDialogs (true for enabled, false for disabled).
  257. Examples    CFG.enableDialogs( false )
  258.     » true
  259. The alerts are now disabled as false was passed in.  Prior to this call, the alerts were enabled as indicated by the return value of true.
  260. Notes    Use this command very carefully!  CFG does not distinguish between commands directly from the user and commands from scripts.  If user interaction is disabled, it will stay that way until re-enabled by this command.
  261. During the time that alerts and dialogs are disabled, the only alerts or dialogs displayed are ones due to errors.
  262. If a dialog or alert is suppressed, the program will proceed as if the user chose the default dialog response.
  263. Exception:  if the default action may require user interaction, then the alternative action is chosen (example: the default for "Save Changes" is "OK", but since the user may need to enter the path, "Don't Save" would be chosen).
  264. If the alerts were disabled, make sure they are re-enabled before exiting the script.
  265. See Also    None
  266.  
  267. Verb    CFG.errorString
  268. Syntax    CFG.errorString()
  269. Parameters    None
  270. Action    Returns the last error which was detected.
  271. Returns    String with last error.
  272. Examples    CFG.errorString()
  273.     » ""
  274. No errors
  275.  
  276. CFG.errorString()
  277.     » "Out of memory"
  278. Last error was an out of memory error.
  279. Notes    This function returns a null string ("") if no errors have occurred since program start.
  280. See Also    CFG.clearErrorString
  281.  
  282. Verb    CFG.generating
  283. Syntax    CFG.generating()
  284. Parameters    None
  285. Action    Determine whether the target fractal is being generated.
  286. Returns    True if fractal is being generated, false otherwise.
  287. Examples    CFG.generating()
  288.     » false
  289. Notes    The target window must be a fractal window.
  290. See Also    CFG.cancelBuild
  291. CFG.continueBuild
  292. CFG.redraw
  293.  
  294. Verb    CFG.getDepth
  295. Syntax    CFG.getDepth()
  296. Parameters    None
  297. Action    Get the target's color depth (bits per pixel).
  298. Returns    An integer with the number of bits per pixel.  Valid responses are -1, 4, 8, 16, and 32.
  299. Examples    CFG.getDepth()
  300.     » 8
  301.  
  302. CFG.getDepth()
  303.     » 32
  304. Notes    If the target is not a fractal, the default depth for a new fractal is returned.  This information is displayed in the New Parameters Window.
  305. A response of -1 (CFG.const.depthDeep) means to use the color depth of the deepest monitor attached to the system.  Thus, if a computer has two monitors, one set to 4 bits / pixel and the other to 16, a CFG.getDepth of -1 means to use the 16 bit depth.
  306. The depth is actually a field of the preferences.  However, since it is unwieldy to handle the preferences structure just to modify the fractal color depth, this function and CFG.setDepth were created.
  307. See Also    CFG.displayPrefsDislog
  308. CFG.getPreferences
  309. CFG.setDepth
  310. CFG.setPreferences
  311.  
  312. Verb    CFG.getFilePath
  313. Syntax    CFG.getFilePath()
  314. Parameters    None
  315. Action    Retrieves the path to the target's save file.
  316. Returns    A string with the path to the file or an empty string if no path exists or the full path cannot fit inside a string.
  317. Examples    CFG.getFilePath()
  318.     » "HD:myFractal"
  319. Notes    The target window must be a fractal window.
  320. The full path is limited to 255 characters.  If it is larger that 255 characters, an empty string is returned.
  321. See Also    CFG.open
  322. CFG.save
  323.  
  324. Verb    CFG.getFractalData
  325. Syntax    CFG.getFractalData()
  326. Parameters    None
  327. Action    Fetches the target's internal data.
  328. Returns    Returns a copy of the target's data stored in a record.
  329. Examples    CFG.getFractalData()
  330.     » {'accr':100, 'free':2, ... }
  331. Notes    The target window must be a fractal window.
  332. The meaning of this data depends on the type of fractal that it came from (which is determined from CFG.getFractalType).  The record structure is located in the "CFG Scripting Guide."
  333. See Also    CFG.setFractalData
  334.  
  335. Verb    CFG.getFractalSize
  336. Syntax    CFG.getFractalSize()
  337. Parameters    None
  338. Action    Obtains the size of the target's offscreen fractal data.
  339. Returns    A Point representing the width and height of the data.
  340. Examples    CFG.getFractalSize()
  341.     » { 640, 480 }
  342. Notes    If the target is not a fractal, the New Parameters Window's fractal size is returned.  This represents the fractal size for newly created fractals.
  343. See Also    CFG.setFSizeCustom
  344. CFG.setFSizeMenu
  345.  
  346. Verb    CFG.getFractalType
  347. Syntax    CFG.getFractalType( [fractalName] )
  348. Parameters    fractalName is an optional parameter which will store the fractal's name.
  349. Action    Get the fractal type of the target (and optionally the fractal name).
  350. Returns    An integer with the fractal ID number ("CFG.const.ftype...").
  351. Examples    local (theName)
  352. CFG.getFractalType( @theName )
  353.     » 3
  354. theName will store the string "Dragon" (the name of fractal type 3).
  355. Notes    The target can be any type of window.  For non-fractal windows, the fractal type represents the type displayed in the New Parameters window.
  356. See Also    CFG.setFractalType
  357. CFG.windowType
  358.  
  359. Verb    CFG.getLimitExtreme
  360. Syntax    CFG.getLimitExtreme()
  361. Parameters    None
  362. Action    Get current setting for limiting outlying values of randomly generated fractal variables.
  363. Returns    True if the limit is on, false if not.
  364. Examples    CFG.getLimitExtreme()
  365.     » false
  366. Notes    The target may be any type of window.
  367. The limit extreme value only applies to the current target.  Other windows may be set differently.
  368. If the target is the Help Window or New Parameters window, the setting will be the global setting which will be applied to new fractals.
  369. See Also    CFG.setLimitExtreme
  370.  
  371. Verb    CFG.getPICT
  372. Syntax    CFG.getPICT()
  373. Parameters    None
  374. Action    Get the PICT data for the current selection.
  375. Returns    'PICT' data for the current selection or false if no selection or an error occurred.
  376. Examples    CFG.getPICT()
  377.     » /PICT DATA/
  378.  
  379. CFG.getPICT()
  380.     » false
  381. Nothing was selected, so false was returned.
  382. Notes    The target window must be a fractal window.
  383. The target must currently have a selection.  This selection will be the PICT information which is returned.
  384. The unregistered version of CFG will simply return false without capturing the PICT data.
  385. See Also    CFG.copy
  386. CFG.cut
  387. CFG.getText
  388. CFG.putPICT
  389. CFG.savePicture
  390.  
  391. Verb    CFG.getPreferences
  392. Syntax    CFG.getPreferences()
  393. Parameters    None
  394. Action    Get a copy of the target's preferences.
  395. Returns    The target's preferences data stored in a record.
  396. Examples    CFG.getPreferences()
  397.     » {'flag':57872, 'prec':9, 'dmnu':1}
  398. Notes    If the target is not a fractal window, the returned data is from the global preferences, which are applied to new fractals.
  399. The structure of the preferences data is explained in the "CFG Scripting Guide."
  400. See Also    CFG.setPreferences
  401.  
  402. Verb    CFG.getScrollPosition
  403. Syntax    CFG.getScrollPosition()
  404. Parameters    None
  405. Action    Gets the current and maximum scrolling parameters of the target.
  406. Returns    Rectangle with scroll information:
  407. r.left         current horizontal scroll setting
  408. r.right       maximum horizontal scroll setting
  409. r.top          current vertical scroll setting
  410. r.bottom    maximum vertical scroll setting
  411. Examples    CFG.getScrollPosition()
  412.     » { 2, 3, 10, 20 }
  413. The current scroll positions (h,v) are (2,3) while the maximum are (10,20).
  414. Notes    The target cannot be the New Parameters Window as it does not have a scroll region.
  415. A value of -1 indicates no scroll information is available for that parameter.  For example:  the help window would return a -1 for r.left and r.right since it has no horizontal scroll bar.
  416. The minimum scroll setting is 1.
  417. See Also    CFG.getWindowRect
  418. CFG.scrollWindow
  419.  
  420. Verb    CFG.getSelection
  421. Syntax    CFG.getSelection()
  422. Parameters    None
  423. Action    Retrieves the target's current selection.
  424. Returns    Rectangle with the selection.
  425. Examples    CFG.getSelection()
  426.     » { 0, 0, 640, 480 }
  427. Notes    This verb should not be applied to the New Parameters Window as it cannot have any selections.
  428. For fractal windows, the rectangle is the selection in local coordinates.  It is absolute with respect to the fractal's offscreen data.
  429. Only the left and right parameters of the rectangle are valid for the Help Window.  These specify the beginning and ending character positions of the selection.
  430. If nothing is selected, an empty rectangle is returned.
  431. See Also    CFG.deselect
  432. CFG.haveSelection
  433. CFG.selectAll
  434. CFG.selectRectAbs
  435. CFG.selectRectRel
  436.  
  437. Verb    CFG.getSpeed
  438. Syntax    CFG.getSpeed()
  439. Parameters    None
  440. Action    Obtain the fractal generation speed.
  441. Returns    An integer with the speed.  Constant definitions for the speed are located in "CFG.const.speed...".
  442. Examples    CFG.getSpeed()
  443.     » 1
  444. Notes    none
  445. See Also    CFG.setSpeed
  446.  
  447. Verb    CFG.getTarget
  448. Syntax    CFG.getTarget()
  449. Parameters    None
  450. Action    Returns the current target window.
  451. Returns    String with the name of the current target window.
  452. Examples    CFG.getTarget()
  453.     » "Mandelbrot 1"
  454. Notes    If no target window was ever assigned, the front-most window made the target and its name is returned.
  455. See Also    CFG.selectWindow
  456. CFG.setTarget
  457.  
  458. Verb    CFG.getText
  459. Syntax    CFG.getText()
  460. Parameters    None
  461. Action    Get the text of the current selection.
  462. Returns    Text data
  463. Examples    CFG.getText()
  464.     » "Registration information"
  465. The selected region of text was "Registration information"
  466. Notes    The target window must be the Help Window.
  467. The target must have a region of selected text.
  468. See Also    CFG.copy
  469. CFG.cut
  470. CFG.getPICT
  471. CFG.putPICT
  472.  
  473. Verb    CFG.getWindowPos
  474. Syntax    CFG.getWindowPos()
  475. Parameters    None
  476. Action    Get the target window's position.
  477. Returns    A rectangle representing the window's position.
  478. Examples    CFG.getWindowPos()
  479.     » { 30, 30, 120, 200 }
  480. Notes    The rectangle is in global coordinates.  It corresponds to the content region of the window (it includes the scroll bar region - if present).
  481. The target window can be any type of window.
  482. See Also    CFG.getWindowRect
  483. CFG.grayRgnRect
  484. CFG.moveWindow
  485.  
  486. Verb    CFG.getWindowRect
  487. Syntax    CFG.getWindowRect()
  488. Parameters    None
  489. Action    Returns the target's view rectangle relative to the entire data region.
  490. Returns    Rectangle
  491. Examples    CFG.getWindowRect()
  492.     » { 187, 190, 292, 450 }
  493. Notes    The target window can be any type.
  494. For non-fractal windows, this simply returns the window boundaries in global coordinates.
  495. For fractals, the position of the view rectangle (window's content region seen on screen) relative to the entire data region (fractal size) is returned.
  496.     Thus, the content region (in global coordinates) minus the amount that the window has been scrolled is returned.
  497. See Also    CFG.getWindowPos
  498. CFG.grayRgnRect
  499. CFG.moveWindow
  500.  
  501. Verb    CFG.grayRgnRect
  502. Syntax    CFG.grayRgnRect()
  503. Parameters    None
  504. Action    Returns the total desktop area minus menu bar region and a 4 pixel frame surrounding the desktop.
  505. Returns    Rectangle
  506. Examples    CFG.grayRgnRect()
  507.     » { 24, 4, 456, 636 }
  508. Notes    This function is useful when moving and resizing windows.  The title region of a window must remain in this rectangle.
  509. See Also    CFG.getWindowPos
  510. CFG.getWindowRect
  511. CFG.mainScreenSize
  512.  
  513. Verb    CFG.haveSelection
  514. Syntax    CFG.haveSelection()
  515. Parameters    None
  516. Action    Determines whether the target has a selected area.
  517. Returns    True if the target has a selection or false if it does not.
  518. Examples    CFG.haveSelection()
  519.     » true
  520. Notes    The target window cannot be the New Parameters Window.  This window will never have a selection.
  521. See Also    CFG.deselect
  522. CFG.getSelection
  523. CFG.selectAll
  524. CFG.selectRectAbs
  525. CFG.selectRectRel
  526.  
  527. Verb    CFG.invertColor
  528. Syntax    CFG.invertColor()
  529. Parameters    None
  530. Action    Inverts the selected region's colors.
  531. Returns    True if OK, false on error.
  532. Examples    CFG.invertColor()
  533.     » true
  534. Notes    The target must be a fractal window.
  535. An area of the fractal must be selected.  Only those pixels in the selection are inverted.
  536. This command cannot be used when the target window is building a fractal.
  537. See Also    CFG.getPICT
  538. CFG.putPICT
  539.  
  540. Verb    CFG.listFractalTypes
  541. Syntax    CFG.listFractalTypes()
  542. Parameters    None
  543. Action    Generate a list of fractals which are supported by CFG.
  544. Returns    A list of fractal names.
  545. Examples    CFG.listFractalTypes()
  546.     » {"Mandelbrot", "Julia", "Dragon", "Random Walk"}
  547. Notes    none
  548. See Also    CFG.getFractalType
  549. CFG.setFractalType
  550.  
  551. Verb    CFG.listHelpItems
  552. Syntax    CFG.listHelpItems()
  553. Parameters    None
  554. Action    Generate a list of topics available from the Help window.
  555. Returns    A list of topics available from the Help window pop-up menu.
  556. Examples    CFG.listHelpItems()
  557.     » {"Help System", "Creating Fractals", "Applying Color",  ... }
  558. Notes    none
  559. See Also    CFG.openHelpWindow
  560. CFG.setHelpItem
  561.  
  562. Verb    CFG.listPalettes
  563. Syntax    CFG.listPalettes()
  564. Parameters    None
  565. Action    Returns the Palette menu's list of palettes for the target.
  566. Returns    A list of palette names.
  567. Examples    CFG.listPalettes()
  568.     » {"Grayscale Palette", "Rainbow Palette", "System Palette", "myCustomPalette"}
  569. Notes    If the target window is not a fractal, the returned list contains the global palettes available to a new fractal.
  570. See Also    CFG.loadPalette
  571. CFG.savePalette
  572. CFG.setPalFromList
  573.  
  574. Verb    CFG.loadPalette
  575. Syntax    CFG.loadPalette( path )
  576. Parameters    path is the full path name of the desired palette file.
  577. Action    Loads a specified palette file.
  578. Returns    True on success, false on failure.
  579. Examples    CFG.loadPalette( "HD:myPalette" )
  580.     » true
  581. Notes    The loaded file will become the target's custom palette file.  This change will be reflected in the Palette menu when the target becomes the top-most window.
  582. Although the palette is loaded, the colors of the fractal will not be altered for 16 and 32 bit environments until it is regenerated.
  583. If the target is not a fractal, the loaded palette becomes the default palette for new fractals.  This information is shown in the New Parameters Window.
  584. This command only loads CFG created palettes.  It cannot handle 'clut' and 'pltt' resources.
  585. This command cannot be used when the target window is building a fractal.
  586. See Also    CFG.listPalettes
  587. CFG.savePalette
  588. CFG.setPalFromList
  589.  
  590. Verb    CFG.madeChanges
  591. Syntax    CFG.madeChanges()
  592. Parameters    None
  593. Action    Determines whether any changes have been made to the target since the last time it was saved.
  594. Returns    True if changes were made or false if the target is not "dirty".
  595. Examples    CFG.madeChanges()
  596.     » true
  597. Notes    The target window must be a fractal window.
  598. If the target was never saved (such as creating a fractal with New), true will always be returned.
  599. See Also    CFG.saveAs
  600.  
  601. Verb    CFG.mainScreenSize
  602. Syntax    CFG.mainScreenSize()
  603. Parameters    None
  604. Action    Returns the size of the main screen in pixels.
  605. Returns    Point
  606. Examples    CFG.mainScreenSize()
  607.     » { 640, 480 }
  608. Notes    This function is useful when adjusting fractal sizes.
  609. See Also    CFG.getWindowPos
  610. CFG.getWindowRect
  611. CFG.grayRgnRect
  612.  
  613. Verb    CFG.moveWindow
  614. Syntax    CFG.moveWindow( pos )
  615. Parameters    pos is a rectangle specifying the new window coordinates and size.
  616. Action    Moves and resizes a target window.
  617. Returns    True is successful, false on error.
  618. Examples    local( r )
  619. r = rectangle.set( 50, 50, 250, 400 )
  620. CFG.moveWindow( r )
  621.     » true
  622. The window moved to top-left of 50,50 and it is 350 pixels across and 200 pixels high.
  623. Notes    The target can be any window type.  Fractal windows are moved and resize, while other windows types are simply moved (bottom and right rectangle fields are ignored).
  624. If the desired location forces the window off the screen, the operation will fail and the window remains at its present location.
  625. See Also    CFG.getWindowPos
  626. CFG.getWindowRect
  627.  
  628. Verb    CFG.newWindow
  629. Syntax    CFG.newWindow( name )
  630. Parameters    name is an optional parameter which specifies the new window's name.
  631. Action    Creates a new fractal window using the current parameters in the New Parameters Window.
  632. Returns    A string containing the new window's name or an empty string if an error occurred during window creation.
  633. Examples    CFG.newWindow( "myFractal" )
  634.     » "myFractal"
  635.  
  636. CFG.newWindow( "ourFractal" )
  637.     » ""
  638. The empty string indicates an error occurred during the window's creation.
  639.  
  640. CFG.newWindow()
  641.     » "Mandelbrot 1"
  642. A new window was created.  CFG assigned the name "Mandelbrot 1" since no name was provided by the user.
  643. Notes    The name is an optional parameter.  If no name is specified or an empty string is specified, CFG generates its own name for the window.
  644. The fractal information for the new window is taken from the parameters specified in the New Parameters Window.
  645. The new window is NOT made the target window.  It is, however, made the front-most window.
  646. See Also    CFG.closeWindow
  647. CFG.openWindow
  648.  
  649. Verb    CFG.nthWindow
  650. Syntax    CFG.nthWindow( windowN )
  651. Parameters    windowN is the window number to select
  652. Action    Selects a nth window from the top.
  653. Returns    String with the window title of selected window, or an empty string if no such window exists.
  654. Examples    CFG.nthWindow( 4 )
  655.     » "Mandelbrot 1"
  656. Notes    The specified window is made the front-most window and also the target.
  657. The top window is considered window 1, the window below that is 2, etc.
  658. If the specified window does not exist (windowN is greater than the total number of windows), an empty string is returned.
  659. See Also    CFG.cycleWindows
  660. CFG.selectParamsWindow
  661. CFG.selectWindow
  662.  
  663. Verb    CFG.openHelpWindow
  664. Syntax    CFG.openHelpWindow()
  665. Parameters    None
  666. Action    Opens the help window and brings it to the front.
  667. Returns    String with the name of the Help Window.
  668. Examples    CFG.openHelpWindow()
  669.     » "Help Window"
  670. Notes    The help window is made the target window.
  671. If the help window is already open, it is simply selected and made the target.
  672. See Also    CFG.closeWindow
  673. CFG.listHelpItems
  674. CFG.openWindow
  675. CFG.selectHelpItem
  676.  
  677. Verb    CFG.openWindow
  678. Syntax    CFG.openWindow( path )
  679. Parameters    path specifies the full path to the file to open.
  680. Action    Opens a fractal window using information from the file specified in 'path'.
  681. Returns    True if the file was properly opened and false if an error occurred.
  682. Examples    CFG.openWindow( "HD:myFractal" )
  683.     » true
  684.  
  685. CFG.openWindow( "HD:?!~" )
  686.     » false
  687. An error occurred while attempting to open the specified fractal.  One possible explanation is that the path specification is invalid.
  688. Notes    The newly opened window is NOT made the target window.  It is, however, made the front-most window.
  689. See Also    CFG.closeWindow
  690. CFG.newWindow
  691. CFG.openHelpWindow
  692.  
  693. Verb    CFG.paste
  694. Syntax    CFG.paste()
  695. Parameters    none
  696. Action    Pastes a PICT image from the Clipboard into the fractal window.
  697. Returns    True if the paste was successful or false if no image could be pasted.
  698. Examples    CFG.paste()
  699.     » True
  700. Notes    The target window must be a fractal window.
  701. The image on the Clipboard must be in PICT format.
  702. If the window has a selection, the image is pasted into the selection (scaled to fit the selected rectangle).  Otherwise it is scaled to fit the window.
  703. This command cannot be used when the target window is building a fractal.
  704. Data can only be copied from the Clipboard if CFG is the active application.
  705. See Also    CFG.clear
  706. CFG.copy
  707. CFG.cut
  708. CFG.getPICT
  709. CFG.putPICT
  710.  
  711. Verb    CFG.performanceTest
  712. Syntax    CFG.performanceTest( r1, r2 )
  713. Parameters    r1 and r2 are two rectangles which are used in the test.
  714. Action    This verb performs a rectangle subtraction (r1 - r2) and returns the result.
  715. Returns    A rectangle which is the result of the rectangle subtraction (r1 - r2).
  716. Examples    r1 = rectangle.set( 50, 50, 60, 60 )
  717. r2 = rectangle.set( 20, 20, 25, 25 )
  718. CFG.performanceTest( r1, r2 )
  719.     » { 30, 30, 35, 35 }
  720. Notes    This verb supports the performance benchmark test written in Frontier.
  721. See Also    None
  722.  
  723. Verb    CFG.putPICT
  724. Syntax    CFG.putPICT( pict )
  725. Parameters    pict is a graphic which will be placed in the target
  726. Action    "Pastes" the picture into the target's selected rectangle
  727. Returns    True if the operation was successful, false on failure
  728. Examples    local( pict )
  729. clipboard.get( 'PICT', @pict ) « stuff "pict" with some image data
  730. CFG.putPICT( pict )
  731.     » true
  732. Notes    The graphic passed to this verb must be of type 'PICT'.
  733. The target window must be a fractal window.
  734. The picture will be "pasted" inside the selection and stretched to fit the selection.  If there is no selection, the picture is scaled to fit the window.
  735. This command cannot be used when the target window is building a fractal.
  736. See Also    CFG.getPICT
  737. CFG.getText
  738. CFG.paste
  739. CFG.savePicture
  740.  
  741. Verb    CFG.quit
  742. Syntax    CFG.quit( [action] )
  743. Parameters    action is an optional parameter.  If present, it should have a value of 1, 2, or 3.
  744. Action    Sends a quit command to CFG.
  745. Returns    True
  746. Examples    CFG.quit()
  747.     » true
  748. Notes    The optional parameter action specifies whether to automatically save the window if dirty, don't save, or prompt the user.  See "CFG.const.saveData..." constants.
  749. If CFG dialog display is disabled, this function will not display any prompts.  Windows will simply not be saved.
  750. See Also    None
  751.  
  752. Verb    CFG.redraw
  753. Syntax    CFG.redraw()
  754. Parameters    None
  755. Action    Reset the fractal creation process and start building the target fractal.
  756. Returns    True if the process started, false on error.
  757. Examples    CFG.redraw()
  758.     » true
  759. Notes    The target window must be a fractal window.
  760. This command cannot be used when the target window is building a fractal.
  761. See Also    CFG.cancelBuild
  762. CFG.continueBuild
  763. CFG.generating
  764.  
  765. Verb    CFG.revertFractal
  766. Syntax    CFG.revertFractal()
  767. Parameters    None
  768. Action    Resets the target its state when it was last saved.
  769. Returns    True if the target was reverted or false if an error occurs.
  770. Examples    CFG.revertFractal()
  771.     » true
  772. Notes    The target window must be a fractal window.
  773. If the target was never saved (and no file is associated with the target), the target cannot be reverted.
  774. This command cannot be used when the target window is building a fractal.
  775. See Also    CFG.saveAs
  776.  
  777. Verb    CFG.saveAs
  778. Syntax    CFG.saveAs( [path] )
  779. Parameters    path is an optional parameter which specifies a name and location of the saved file.
  780. Action    Saves the contents of the target window to disk.
  781. Returns    True if the file was saved or false if it was not saved.
  782. Examples    CFG.saveAs( "HD:myFractal" )
  783.     » true
  784. The contents of the target were saved to the file specified by the path "HD:myFractal".
  785.  
  786. CFG.saveAs()
  787.     » true
  788. The fractal information was saved to the target's previous save file.
  789. Notes    The target window must be a fractal window.
  790. If the path is specified, CFG.saveAs functions as the "Save As" command.  If no path is specified, this verb functions as the "Save" command.
  791. If no path is specified and no file is associated with the fractal, false is returned (and an error is flagged).
  792. See Also    CFG.revertFractal
  793.  
  794. Verb    CFG.savePalette
  795. Syntax    CFG.savePalette( path )
  796. Parameters    path is the file name and location to save the palette.
  797. Action    Saves the target's current palette to a file.
  798. Returns    True on success, false on failure.
  799. Examples    CFG.savePaletteFile( "HD:myPalette" )
  800.     » true
  801. Notes    The current palette may not be the target's custom palette.
  802. See Also    CFG.listPalettes
  803. CFG.loadPalette
  804. CFG.setPalFromList
  805.  
  806. Verb    CFG.savePicture
  807. Syntax    CFG.savePICT( path, picType )
  808. Parameters    path is the file name and location to save the fractal's image.
  809. picType is the graphic file format.  Currently, only 'PICT' is supported.
  810. Action    Saves the selected region of the fractal to a graphics file.
  811. Returns    True on success, false on failure.
  812. Examples    CFG.savePICT( "HD:myPICT", CFG.const.imagePICT )
  813.     » true
  814. Notes    The target window must be a fractal.
  815. If an area of the target is selected, only the selection is saved to the file.
  816. Future versions of CFG may support more graphics formats.
  817. This function only works on registered versions of CFG.
  818. See Also    CFG.getPICT
  819. CFG.putPICT
  820.  
  821. Verb    CFG.scrollWindow
  822. Syntax    CFG.scrollWindow( dir, count )
  823. Parameters    dir is the direction to scroll the window.
  824. count is the amount to move it.
  825. Action    Scrolls the target in the direction and amount specified.
  826. Returns    True on a successful scroll, false on scroll failure.
  827. Examples    CFG.scrollWindow( pageDown, 1 )
  828.     » true
  829. Moves the target window down by 1 page.
  830. Notes    The New Parameters Window cannot be scrolled at all and the Help Window may only be scrolled vertically.  If attempts are made to scroll in illegal directions, false will be returned.
  831. The numeric definitions for direction are located in the "CFG Scripting Guide".  You may also use the directions defined by Frontier.
  832. If false is returned, it means that the scrolling has reached its limit in the specified direction.
  833. See Also    None
  834.  
  835. Verb    CFG.selectAll
  836. Syntax    CFG.selectAll()
  837. Parameters    None
  838. Action    Selects the entire contents of the target.
  839. Returns    True if successful, false if selection could not be made.
  840. Examples    CFG.selectAll()
  841.     » true
  842. Notes    The target window cannot be the New Parameters Window as nothing can be selected in this type of window.
  843. If the target is a fractal window, the entire fractal picture is selected.  For Help Windows, all text for the current help section is selected.
  844. This command cannot be used when the target window is building a fractal.
  845. See Also    CFG.deselect
  846. CFG.getSelection
  847. CFG.haveSelection
  848. CFG.selectRectAbs
  849. CFG.selectRectRel
  850.  
  851. Verb    CFG.selectHelpItem
  852. Syntax    CFG.selectHelpItem( itemName )
  853. Parameters    itemName is the name of the item for which to obtain help information.
  854. Action    Display help information for a given item.
  855. Returns    True if item displayed, false on error.
  856. Examples    CFG.selectHelpItem( "Registration" )
  857.     » true
  858. Notes    The target must be the help window.
  859. A list of valid help items is returned by CFG.listHelpItems().
  860. See Also    CFG.listHelpItems
  861. CFG.openHelpWindow
  862.  
  863. Verb    CFG.selectParamsWindow
  864. Syntax    CFG.selectParamsWindow()
  865. Parameters    None
  866. Action    Bring the New Parameters Window to the front.
  867. Returns    String with the name of the New Parameters Window or an empty string on an error.
  868. Examples    CFG.selectParamsWindow()
  869.     » "New Parameters"
  870. Notes    The New Parameters Window is made the target.
  871. As the New Parameters Window cannot be disposed, it should always be present.  It may not always be named "New Parameters", however.
  872. See Also    CFG.nthWindow
  873. CFG.selectWindow
  874.  
  875. Verb    CFG.selectRecAbs
  876. Syntax    CFG.selectRectAbs( rect )
  877. Parameters    rect is the coordinates of the selection
  878. Action    Select a region of the target using coordinates that references the top,left of the target's data.
  879. Returns    True if no error, false on error.
  880. Examples    r = rectange.set( 0, 0, 640, 480 )
  881. CFG.selectRecAbs( r )
  882.     » true
  883. Notes    This verb should not be applied to the New Parameters Window as it cannot have any selections.
  884. For fractal windows, the selected rectangle will appear at the specified location with respect to the fractal's offscreen data.
  885. Thus if the rectangle was { 10, 10, 30, 30 }, the selection would appear 10 pixels down and to the right of the offscreen's top left corner.  The location on screen depends on the current scroll coordinates.
  886. For Help Windows, only the left and right fields of the rectangle are valid.  These specify the character positions to start and end the selection respectively.
  887. Relative and absolute have no meaning for the Help Window.  Therefore, this function is the same as CFG.selectRectRel for the Help Window.
  888. This command cannot be used when the target window is building a fractal.
  889. See Also    CFG.deselect
  890. CFG.getSelection
  891. CFG.haveSelection
  892. CFG.selectAll
  893. CFG.selectRectRel
  894.  
  895. Verb    CFG.selectRectRel
  896. Syntax    CFG.selectRectRel( rect )
  897. Parameters    rect is the coordinates of the selection
  898. Action    Select a region of the target relative to the current view region.
  899. Returns    True if no error, false on error.
  900. Examples    r = rectangle.set( 0, 0, 256, 256 )
  901. CFG.selectRectRel( r )
  902.     » true
  903. Notes    This verb should not be applied to the New Parameters Window as it cannot have any selections.
  904. For fractal windows, the selected rectangle will appear relative to the top-left corner of the viewing region.
  905. Thus if the rectangle was { 10, 10, 30, 30 }, the selection would appear 10 pixels down and to the right of the window's top left corner, no matter where scroll coordinates are located.
  906. For Help Windows, only the left and right fields of the rectangle are valid.
  907. These specify the character positions to start and end the selection respectively.  Relative and absolute have no meaning for the Help Window.  Therefore, this function is the same as CFG.selectRectAbs for the Help Window.
  908. This command cannot be used when the target window is building a fractal.
  909. See Also    CFG.deselect
  910. CFG.getSelection
  911. CFG.haveSelection
  912. CFG.selectAll
  913. CFG.selectRectAbs
  914.  
  915. Verb    CFG.selectWindow
  916. Syntax    CFG.selectWindow( name )
  917. Parameters    name is the title of the window to select.
  918. Action    Makes the specified window the front-most window.
  919. Returns    True if the named window was found or false if no such window exists.
  920. Examples    CFG.selectWindow( "Mandelbrot 1" )
  921.     » true
  922. Notes    The selected window becomes the target window.
  923. See Also    CFG.getTarget
  924. CFG.nthWindow
  925. CFG.selectParamsWindow
  926. CFG.setTarget
  927.  
  928. Verb    CFG.setDepth
  929. Syntax    CFG.setDepth( depth )
  930. Parameters    depth is the number of bits per pixel.  Default values are defined in "CFG.const.depth...".  A setting of CFG.const.depthDeep means to use the depth of the deepest screen.
  931. Action    Sets the target's color depth.
  932. Returns    True if depth altered, false on error.
  933. Examples    CFG.setDepth( CFG.const.depth16Bit )
  934.     » true
  935. Notes    Always reset the target window after false is returned.  It is possible that a memory allocation error will occur when attempting to change the depth of the offscreen buffer.  In this case, the window may be disposed.
  936. If the target is not a fractal window, the new depth will become the default depth for new fractals.  This information will be reflected in the New Parameters Window.
  937. The depth is actually a field of the preferences.  However, since it is unwieldy to handle the preferences structure just to modify the fractal color depth, this function and CFG.getDepth were created.
  938. This command cannot be used when the target window is building a fractal.
  939. See Also    CFG.getDepth
  940. CFG.getPreferences
  941. CFG.setPreferences
  942.  
  943. Verb    CFG.setFractalData
  944. Syntax    CFG.setFractalData( fracData )
  945. Parameters    fracData is a record containing the data fields that the user wants to modify.
  946. Action    Inserts the fractal data into the target.
  947. Returns    True if the data was applied, false if the data was invalid data or if not a fractal window.
  948. Examples    fractalData = { CFG.const.fdataAccuracy:50, CFG.const.fdataScaleX:0.01 }
  949. CFG.setFractalData( fractalData )
  950.     » true
  951. Notes    The target window must be a fractal window.
  952. The meaning of this data depends on the type of fractal that it came from (which is determined from CFG.getFractalType).  The record structure is located in the "CFG Scripting Guide."
  953. Fields that the user does not wish to alter can be omitted.
  954. Data verification will be performed.
  955. This command cannot be used when the target window is building a fractal.
  956. See Also    CFG.getBinary
  957.  
  958. Verb    CFG.setFractalType
  959. Syntax    CFG.setFractalType( fractal )
  960. Parameters    fractal is the name or ID of a fractal type.  Constants are defined in "CFG.const.ftype..." and "CFG.const.fname...".
  961. Action    Sets the fractal type to use for new fractals.
  962. Returns    True if desired fractal could be set, false otherwise.
  963. Examples    CFG.setFractalType( CFG.const.ftypeDragon )
  964.     » true
  965.  
  966. CFG.setFractalType( "Moth" )
  967.     » false
  968. "Moth" is an unknown fractal type.
  969. Notes    The target cannot be a fractal window, as once a fractal is assigned to a window, it cannot be changed.
  970. See Also    CFG.getFractalType
  971. CFG.listFractalTypes
  972.  
  973. Verb    CFG.setFSizeCustom
  974. Syntax    CFG.setFSizeCustom( customSize )
  975. Parameters    customSize is a Point whose horizontal and vertical fields specify the width and height of the fractal respectively.
  976. Action    Sets the fractal size according to the user specified horizontal and vertical coordinates.
  977. Returns    True if size was valid or false on error.
  978. Examples    p = point( 640 + 480 * 0x10000 ) « a little trick to use h,v integers to create a point
  979. CFG.setFSizeCustom( p )
  980.     » true
  981.  
  982. p = point( "-10, 32001" )
  983. CFG.setFSizeCustom( p )
  984.     » false
  985. Both the fields of customSize are invalid.
  986. Notes    If the target window is not a fractal, the global size values are modified, which specify the size of newly created fractals.  This information will be reflected in the New Parameters Window.
  987. This command cannot be used when the target window is building a fractal.
  988. See Also    CFG.setFSizeMenu
  989.  
  990. Verb    CFG.setFSizeMenu
  991. Syntax    CFG.setFSizeMenu( sizeItem )
  992. Parameters    sizeItem is a constant that defines which standard size to use.  See "CFG.const.fsize..." for a list of default sizes.
  993. Action    Set the fractal's size to standard sizes displayed in the Size Menu.
  994. Returns    True if the fractal size was changed, false on error.
  995. Examples    CFG.setFSizeMenu( CFG.const.fsize13Inch )
  996.     » true
  997. Sets the fractal size to that of a 13" monitor (640 x 480 pixels).
  998.  
  999. CFG.setFSizeMenu( 9 )
  1000.     » false
  1001. Size item number is invalid.
  1002. Notes    If the target window is not a fractal, the global size values are modified, which specify the size of newly created fractals.  This information will be reflected in the New Parameters Window.
  1003. Use the CFG.setFSizeCustom command for non-standard image sizes.
  1004. This command cannot be used when the target window is building a fractal.
  1005. See Also    CFG.setFSizeCustom
  1006.  
  1007. Verb    CFG.setLimitExtreme
  1008. Syntax    CFG.setLimitExtreme( limit )
  1009. Parameters    limit is a Boolean set to true to turn the limiting on and false to turn it off.
  1010. Action    Alter the target's limit extreme value.
  1011. Returns    True
  1012. Examples    CFG.setLimitExtreme( true )
  1013.     » true
  1014. Notes    The target may be any type of window.
  1015. If the target is the Help Window or New Parameters window, the setting is applied to the global setting, which affects newly created fractals.
  1016. See Also    CFG.getLimitExtreme
  1017.  
  1018. Verb    CFG.setPalFromList
  1019. Syntax    CFG.setPalFromList( paletteTitle )
  1020. Parameters    paletteTitle is the name of the palette that appears in the target's Palette menu.
  1021. Action    Sets the palette entitled paletteTitle as the target's current palette.
  1022. Returns    True if palette loaded, false on error.
  1023. Examples    CFG.setPalFromList( CFG.const.palNameRainbow )
  1024.     » true
  1025.  
  1026. CFG.setPalFromList( "An ugly palette" )
  1027.     » false
  1028. The palette entitled "An ugly palette" does not exist in the target's Palette menu.
  1029. Notes    If the target is a fractal window, the palette is made the current palette.  Colors are altered immediately for 4 and 8 bit systems.  Fractals with more colors require a redraw.
  1030. If the target is not a fractal window, the new palette will be the default palette for new fractals.  This information is displayed in the New Parameters Window.
  1031. The palette menu has a set of standard palette defined and one custom palette per fractal.  If you wish to assign the custom palette, be sure to obtain its name by using CFG.getPaletteList().
  1032. Note that the custom palette displayed in the Palette menu is for the top fractal window only.  If the target is not the top-most window, the custom palette in the Palette menu may not be the target's custom palette.
  1033. This command cannot be used when the target window is building a fractal.
  1034. See Also    CFG.getPaletteFile
  1035. CFG.listPalettes
  1036. CFG.savePaletteFile
  1037.  
  1038. Verb    CFG.setPreferences
  1039. Syntax    CFG.setPreferences( prefs )
  1040. Parameters    prefs is a record with the preferences data.
  1041. Action    Copies the data into the target's preferences.
  1042. Returns    True if successful or false on error.
  1043. Examples    prefs = {CFG.const.prefsFlags:57872, CFG.const.prefsPrecision:9}
  1044. CFG.setPreferences( prefs )
  1045.     » true
  1046. Notes    If the target is not a fractal window, the data is copied to the global preferences, which are applied to new fractals.
  1047. The structure of the preferences data is explained in the "CFG Scripting Guide."
  1048. Data validation is performed before the preferences are inserted.
  1049. Only those fields that will be altered need to be present in the record.
  1050. This command cannot be used when the target window is building a fractal.
  1051. See Also    CFG.getPreferences
  1052.  
  1053. Verb    CFG.setSpeed
  1054. Syntax    CFG.setSpeed( speed )
  1055. Parameters    speed specifies the fractal generation speed.  Speed constants are defined in "CFG.const.speed...".
  1056. Action    Change the fractal generation speed.
  1057. Returns    True on success, false on error.
  1058. Examples    CFG.setSpeed( CFG.const.speedBackMedium )
  1059.     » true
  1060. Notes    Setting to foreground mode will prevent CFG from processing further Apple Events while a fractal is generating.
  1061. See Also    CFG.getSpeed
  1062.  
  1063. Verb    CFG.setTarget
  1064. Syntax    CFG.setTarget( name )
  1065. Parameters    name is the title of the window which will be made the target.  If name is an empty string, the front-most window is made target.
  1066. Action    Makes the specified window the target window.
  1067. Returns    A string with the title of the target window, or an empty string if the desired target was not found.
  1068. Examples    CFG.setTarget( "Mandelbrot 1" )
  1069.     » "Mandelbrot 1"
  1070.  
  1071. CFG.setTarget( "" )
  1072.     » "Dragon 2"
  1073. The front-most window is made the target since the name parameter was an empty string.  "Dragon 2" is the name of the new target window.
  1074. Notes    If an empty string is passed as the desired target's title, the front-most window is set as the target and its name is returned.
  1075. If the specified target was not found, an empty string is returned.  In this case, the target of subsequent operations will default to the front-most window.
  1076. See Also    CFG.getTarget
  1077. CFG.selectWindow
  1078.  
  1079. Verb    CFG.windowType
  1080. Syntax    CFG.windowType()
  1081. Parameters    None
  1082. Action    Get the window type of the target.
  1083. Returns    An integer containing the window type.  Window type constants are defined in CFG.const.wtype...".
  1084. Examples    CFG.windowType()
  1085.     » 1
  1086. Notes    The target may be any type of window.
  1087. The Custom Fractal Window and Fractal Movie Window are not supported in the current version of CFG, but may be in future versions.
  1088. See Also    CFG.getFractalType
  1089.  
  1090. Verb    CFG.zoomInOut
  1091. Syntax    CFG.zoomInOut( zIn )
  1092. Parameters    zIn is a Boolean specifying whether to zoom in or out.  See "CFG.const.zoom...".
  1093. Action    Zooms the target in or out by a factor of two.
  1094. Returns    True if zoom was OK, false on error (such as target not a fractal).
  1095. Examples    CFG.zoomInOut( CFG.const.zoomIn )
  1096.     » true
  1097. Zooming in on the fractal (by a scale factor of 2).
  1098.  
  1099. CFG.zoomInOut( CFG.const.zoomOut )
  1100.     » true
  1101. Zooming out on the fractal.
  1102. Notes    The target must be a fractal, but it cannot be a Random Walk fractal.
  1103. This command cannot be used when the target window is building a fractal.
  1104. See Also    CFG.zoomSelection
  1105. CFG.zoomValue
  1106.  
  1107. Verb    CFG.zoomSelection
  1108. Syntax    CFG.zoomSelection()
  1109. Parameters    None
  1110. Action    Zooms in on the fractal, fitting the selected area to the fractal size.
  1111. Returns    True on success, false on failure.
  1112. Examples    CFG.zoomSelection()
  1113.     » true
  1114. Notes    The target window must be a fractal, but it cannot be a Random Walk fractal.
  1115. The fractal must have a selection.  The selection becomes the fractal's bounding rectangle.  Thus, the top of the selection will become the new top of the fractal, the selection's left side will become the fractal's left edge, etc.
  1116. This command cannot be used when the target window is building a fractal.
  1117. See Also    CFG.zoomInOut
  1118. CFG.zoomValue
  1119.  
  1120. Verb    CFG.zoomValue
  1121. Syntax    CFG.zoomValue( zoomX, zoomY )
  1122. Parameters    zoomX and zoomY are floating point numbers (double precision) which specify the amount to zoom the fractal (horizontally and vertically)
  1123. Action    Zoom in on the fractal by the specified amount.
  1124. Returns    True if successful, false on error.
  1125. Examples    CFG.zoom( 3.0 )
  1126.     » true
  1127. Zooms in on fractal by a factor of 3x.
  1128.  
  1129. CFG.zoom( 0.5 )
  1130.     » true
  1131. Zooms out by a factor of 2 (1 / 0.5).
  1132. Notes    The target window must be a fractal, but it cannot be a Random Walk fractal.
  1133. One zooms in by specifying a value greater than one, while one zooms out with values between zero and one.
  1134. That is, one may zoom out by a factor X by specifying the zoom amount to be (1 / X).
  1135. Zoom values less or equal to 0 are invalid.
  1136. This command cannot be used when the target window is building a fractal.
  1137. See Also    CFG.zoomInOut
  1138. CFG.zoomSelection
  1139.  
  1140. Verb    CFG.zoomWindow
  1141. Syntax    CFG.zoomWindow()
  1142. Parameters    None
  1143. Action    Enlarges / Reduces the size of the target window.
  1144. Returns    True if successful, false if the zoom failed.
  1145. Examples    CFG.zoomWindow
  1146.     » true
  1147. Notes    The target window cannot be the New Parameters Window.  This window has a fixed size.
  1148. See Also    CFG.moveWindow
  1149.